<ion-view id="tab-receive" show-tabs>
  <ion-nav-bar class="bar-royal">
    <ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
    <ion-nav-buttons side="secondary">
      <button class="button-share ng-hide" ng-show="wallets[0] && showShareButton" ng-click="shareAddress()">
        <i class="icon"
          ng-class="{
          'ion-ios-upload-outline': showShareButton == 'iOS',
          'ion-android-share-alt': showShareButton != 'iOS'
          }"></i>
      </button>
    </ion-nav-buttons>
  </ion-nav-bar>
  <ion-content scroll="false">
    <article class="list card padding text-center" ng-if="!wallets[0]">
      <span translate>No Wallet</span>
    </article>
    <article class="address" ng-if="wallets[0]">
      <div class="address-info" class="text-center" ng-if="wallet && !wallet.isComplete()">
        <div class="incomplete">
          <div class="title">
            <span translate>Incomplete wallet</span>
          </div>
          <div class="subtitle">
            <span translate>All signing devices must be added to this multisig wallet before Mobicoin addresses can be created.</span>
          </div>
          <button class="button button-standard button-primary" ng-click="goCopayers()" translate>Open wallet</button>
        </div>
      </div>
      <div class="address-info" ng-if="wallet && wallet.isComplete()">
        <div copy-to-clipboard="addr">
          <span ng-show="shouldShowReceiveAddressFromHardware()">
            <button class="button button-standard button-primary" ng-click="showReceiveAddressFromHardware()">
              <span translate>Show address</span>
            </button>
          </span>
          <qrcode ng-if="addr" size="220" data="{{addr}}" color="#334"></qrcode>
          <!-- MBC Jonathan -->
          <div class="address-label">
            <span class="ellipsis">{{addr}}</span>
            <ion-spinner ng-show="!addr" class="spinner-dark" icon="crescent"></ion-spinner>
          </div>
        </div>
        <!-- MBC Jonathan -->
        <!-- <div>
          <button ng-show="addr" class="button-request" ng-click="requestSpecificAmount()">
            <span translate>Request Specific amount</span>
            <i class="icon ion-ios-arrow-right"></i>
          </button>
        </div> -->
        <div>
          <button ng-show="addr" class="button-address" ng-click="setAddress(true)">
            <span translate>Generate new address</span>
          </button>
        </div>
      </div>
    </article>

    <div class="backup" ng-if="wallets[0] && wallet && wallet.isComplete() && wallet.needsBackup" ng-click="openBackupNeededModal()">
      <i class="icon ion-alert"></i>
      <span translate>Wallet not backed up</span>
      <i class="icon ion-ios-arrow-thin-right"></i>
    </div>

    <div class="wallet-selector" ng-click="showWalletSelector()" ng-if="wallets[0] && wallet">
      <a ng-if="wallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
        <i class="icon big-icon-svg">
          <img src="img/myTcashWallet.png" ng-class="{'wallet-background-color-default': white}" ng-style="{'background-color': white}" class="noShadowBg"/>
        </i>
        <span>
          {{wallet.name || wallet.id}}
        </span>
        <p>
        <span ng-if="!wallet.balanceHidden"> {{wallet.status.totalBalanceStr}} </span>

        <span ng-if="wallet.balanceHidden" translate>[Balance Hidden]</span>
        <span class="tab-home__wallet__multisig-number" ng-if="wallet.n > 1">
          {{wallet.m}}-of-{{wallet.n}}
        </span>
        <span class="assertive" ng-if="wallet.error">{{wallet.error}}</span>
        &nbsp;
        </p>
        <i ng-if="!singleWallet" class="icon bp-arrow-right"></i>
      </a>
    </div>

  </ion-content>
  <wallet-selector
    wallet-selector-title="walletSelectorTitle"
    wallet-selector-wallets="wallets"
    wallet-selector-selected-wallet="wallet"
    wallet-selector-show="showWallets"
    wallet-selector-on-select="onWalletSelect">
  </wallet-selector>
</ion-view>
